<!-- BEGIN: center-->
<script language="JavaScript">
	function doSaveMember(){
		var frm = document.frmMemberTask;
		if(frm.member_username.value == ''){
			alert('Vui long nhap vao username');
			frm.member_username.focus();
			return false;
		}
		if(frm.frmAct.value == 'doMemberSave'){
			if(frm.member_new_password.value == ''){
				alert('Vui long nhap password');
				frm.member_new_password.focus();
				return false;
			}
			if(frm.member_new_password.value.length < 6){
				alert('Password phai dai hon 6 ky tu');
				frm.member_new_password.focus();
				return false;
			}
			if(frm.member_confirm_password.value == ''){
				alert('Vui long xac nhan password');
				frm.member_confirm_password.focus();
				return false;
			}
			if(frm.member_confirm_password.value != frm.member_new_password.value){
				alert('Xac nhan khong dung, vui long xac nhan lai mat khau');
				frm.member_confirm_password.focus();
				return false;
			}
		}
		if(frm.frmAct.value == 'doMemberUpdate' && frm.member_new_password.value != ''){
			if(frm.member_new_password.value.length < 6){
				alert('Password phai dai hon 6 ky tu');
				frm.member_new_password.focus();
				return false;
			}
			if(frm.member_confirm_password.value == ''){
				alert('Vui long xac nhan password');
				frm.member_confirm_password.focus();
				return false;
			}
			if(frm.member_confirm_password.value != frm.member_new_password.value){
				alert('Xac nhan khong dung, vui long xac nhan lai mat khau');
				frm.member_confirm_password.focus();
				return false;
			}
		}
		
		frm.submit();
	}
</script>
<form name="frmMemberTask" action="" method="post">
<input type="hidden" name="frmAct" value="{frmActValue}" />
<input type="hidden" name="member_id" value="{editing_member_id}" />
<table cellpadding="3" cellspacing="3" width="100%" border="0">
	<tr>
		<td colspan="2" align="right">
			<a href="#" onclick="doSaveMember();">Save</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;
			<a href="?mod=admin&act=member">Cancel</a>
		</td>
	</tr>
	<tr>
		<td align="right" width="120">Member Name:</td>
		<td><input type="text" name="member_username" value="{member_username}" style="width: 200px;" /></td>
	</tr>
	<tr>
		<td align="right" width="120">Member Address:</td>
		<td><input type="text" name="member_address" value="{member_address}" style="width: 200px;" /></td>
	</tr>
	<tr>
		<td align="right" width="120">Member Mail:</td>
		<td><input type="text" name="member_mail" value="{member_mail}" style="width: 200px;" /></td>
	</tr>
	<tr>
		<td align="right" width="120">Member Phone:</td>
		<td><input type="text" name="member_phone" value="{member_phone}" style="width: 200px;" /></td>
	</tr>
	<tr>
		<td align="right" width="120">Member Status:</td>
		<td><input type="checkbox" name="member_status" value="1" {memberStatusIsChecked} /></td>
	</tr>
	<tr>
		<td align="right" width="120">New Password:</td>
		<td><input type="password" name="member_new_password" value="" style="width: 150px;" autocomplete="off" /></td>
	</tr>
	<tr>
		<td align="right" width="120">Confirm Password:</td>
		<td><input type="password" name="member_confirm_password" value="" style="width: 150px;" autocomplete="off" /></td>
	</tr>
</table>
</form>
<!-- END: center-->